Prompt dialog before overwriting files on export + checkboxes UI fix#417
Open
linkmodo wants to merge 2 commits into
Open
Prompt dialog before overwriting files on export + checkboxes UI fix#417linkmodo wants to merge 2 commits into
linkmodo wants to merge 2 commits into
Conversation
Export (single) and Export All silently overwrote files that already existed at the destination, with no warning. Now the "Overwrite existing files" option gates this, and the default is safe: - Unchecked (new default): if a batch would clobber existing files, the export is gated on a prompt — Overwrite / Rename / Cancel — listing the conflicting names. Rename falls back to the worker's numbered-suffix auto-rename; Cancel aborts the whole export. Same behavior for single Export and Export All (all route through _run_export_tasks). - Checked: overwrite silently, no prompt (for both Export and Export All). - The prompt carries an "Always overwrite without asking" checkbox that, when ticked with Overwrite, persists the preference (turns the Export-panel option on and the sticky default), so it stays on until turned off. The overwrite default flips True -> False so the warning is on by default; a saved "checked" preference keeps overwriting silently as before. Implementation: - Factor the worker's output-path logic into shared, testable helpers (resolve_export_dir / resolve_export_naming / resolve_export_target_path / find_export_conflicts) so conflict detection resolves the exact path the worker writes, and refactor run_batch to reuse them. - AppController._resolve_export_conflicts runs before dispatch; _set_overwrite_ preference persists the remembered choice without touching edit history. Contact-sheet export is unchanged (already auto-renames, no fixed per-frame names). Tests: path resolution + conflict detection, and controller wiring for the silent preference, overwrite / rename / cancel, remember-persist, and no-conflict pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Fusion's default checkbox indicator is nearly invisible against the app's #0D0D0D background — the unchecked "Overwrite existing files" box (and every other checkbox) blended in. Add a QCheckBox::indicator rule: a clear border and subtle fill when unchecked (brighter on hover), and an accent box with a white checkmark when checked. The checkmark is an SVG (media/icons/checkbox_check.svg); its absolute path is baked into the stylesheet at load time because QSS url() can't resolve relative paths reliably across dev and frozen runs. media/ is already bundled by build.py. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dd8540f to
e2815b2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two commits: the export overwrite-protection change, and a small dark-theme checkbox fix it surfaced.
make lint/make type/make testall pass.1. Prompt before overwriting existing files on export
Export(single) andExport Allsilently overwrote files that already existed at the destination, with no warning. The "Overwrite existing files" option now gates this, and the default is safe:_run_export_tasks).Behavior change: the
overwritedefault flipsTrue → Falseso the warning is on by default. A previously saved "checked" preference keeps overwriting silently as before.Implementation
resolve_export_dir/resolve_export_naming/resolve_export_target_path/find_export_conflicts) so conflict detection resolves the exact path the worker writes, and refactoredrun_batchto reuse them.AppController._resolve_export_conflictsruns before dispatch;_set_overwrite_preferencepersists the remembered choice without touching edit history or re-rendering.2. Visible checkboxes on the dark theme
Fusion's default checkbox indicator is nearly invisible against the app's
#0D0D0Dbackground — the unchecked "Overwrite existing files" box (and every other checkbox) blended in. Added aQCheckBox::indicatorrule: a clear border + subtle fill when unchecked (brighter on hover), and an accent box with a white checkmark when checked. The checkmark is an SVG (media/icons/checkbox_check.svg, already bundled via--add-data=media), with its absolute path injected into the stylesheet at load time since QSSurl()can't resolve relative paths reliably across dev and frozen runs.Tests
test_export_overwrite.py: output-path resolution per output-mode + filesystem conflict detection.test_controller.py: silent-preference path (no prompt), overwrite / rename / cancel, remember-persist, and no-conflict pass-through.(
test_export_presets.py::test_output_dir_subfolder_of_sourcefails on Windows due to a pre-existingos.path.joinseparator assumption, unrelated to this change — fails onmaintoo.)